 var horizontalnavmenu  = function( listcotainerid ){ 
	var leftMenuCounter = parseInt("0");
	var rightMenuCounter = parseInt("0");
	var TOT_MENUS_IN_2_GROUP = parseInt("5");
	var TOT_GROUPS = parseInt("1");	
	var listContainer = jQuery("#" + listcotainerid + ">li");
	var listContainer_length = listContainer.length;
	
	var listArray = jQuery.makeArray(listContainer);
 TOT_GROUPS = Math.floor(parseInt(listContainer_length/TOT_MENUS_IN_2_GROUP));
	
	this.doScroll_horiz = function(scrollDirection){
   var self = this;
		 var i = 0;
		 if(scrollDirection == 'right'){                    //if(scrollDirection == 'right')

					if(rightMenuCounter < TOT_GROUPS){
								var start_li = (rightMenuCounter + 1)*TOT_MENUS_IN_2_GROUP;
								var last_li = (rightMenuCounter + 2)*TOT_MENUS_IN_2_GROUP;
								if(last_li > listContainer_length) last_li = listContainer_length;
								listContainer.css("display","none");
								for(var i =  start_li; i < last_li; i++){
													jQuery(listArray[i]).css("display","block");
								}
								rightMenuCounter++;
								leftMenuCounter++;
						}
		}   
		if(scrollDirection == 'left'){									//if(scrollDirection == 'up')
			if(leftMenuCounter > 0){
			   var start_li = (leftMenuCounter - 1)*TOT_MENUS_IN_2_GROUP;
			   var last_li = (leftMenuCounter)*TOT_MENUS_IN_2_GROUP;
			   listContainer.css("display","none");
			   for(var i =  start_li; i < last_li; i++){
								jQuery(listArray[i]).css("display","block");
						}
				  leftMenuCounter--;
				  rightMenuCounter--;
			 }	
		}
		this.configurebuttons();
	};

	this.arrangetasks = function(){
		listContainer.css("display","none");
		for(var i=0; i<TOT_MENUS_IN_2_GROUP; i++){
			jQuery(listArray[i]).css("display", "block");
		}
	}
	this.configurebuttons = function(){
       if(rightMenuCounter < TOT_GROUPS){
			   jQuery(".horzright").removeClass("disabled"); //("background","../images/menurightarrow.gif");
	   }else{
			jQuery(".horzright").addClass("disabled");  //attr("background","../images/menurightarrow_disable.gif");
	   }
	   if(leftMenuCounter > 0){
		   
			   jQuery(".horzleft").removeClass("disabled"); //attr("src","images/menuleftarrow.gif");
	   }else{
			jQuery(".horzleft").addClass("disabled"); //css("background","images/menuleftarrow_disable.gif");// //
	   }
	}
	
}
	

	// JavaScript Document